using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FEL.ACT;

public partial class ACT_ACT_ATRIBUTO_DET : PaginaBaseKCG
{
    public Act_Atributo ObtenerAct_Atributo_Actual
    {
        get
        {
            if (ViewState["ACT_ATRIBUTO"] == null)
                ViewState["ACT_ATRIBUTO"] = ObtenerAct_Atributo();
            return (Act_Atributo)ViewState["ACT_ATRIBUTO"];
        }
    }

    Act_Atributo ObtenerAct_Atributo()
    {
        FEL.ACT.BO_Act_Atributo datos = new BO_Act_Atributo();
        return datos.GetById("", (Scope)Session["Scope"], Request.QueryString["Act_Atributo_Id"])[0];

    }

    protected void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);
        cargarBotones();
    }

    private void cargarBotones()
    {
        BtnAtributo.Text = GetLocalResourceObject("Btn_Act_Atributo_Det_AtributoRecursoKCG.Text").ToString();
        BtnAtributo.ToolTip = GetLocalResourceObject("Btn_Act_Atributo_Det_AtributoRecursoKCG.ToolTip").ToString();
    }

    protected override CheckBox CbInsertarMemoria
    {
        get { return null; }
    }

    protected override Type TipoObjeto
    {
        get { return typeof(global::Act_Atributo_Det); }
    }

    protected override GridView Gv
    {
        get { return gvact_atributo_det; }
    }

    protected override FormView Fv
    {
        get { return fvact_atributo_det; }
    }

    protected override ObjectDataSource OdsGv
    {
        get { return odsgvact_atributo_det; }
    }

    protected override ObjectDataSource OdsDv
    {
        get { return odsfvact_atributo_det; }
    }

    protected override Button BResponderZoom
    {
        get { return Seleccionar; }
    }

    protected override Button BRegreso
    {
        get { return Atras; }
    }
    
    protected override Koala.KoalaWebControls.KFiltro KftFiltro
    {
        get { return kftFiltro; }
    }
    protected override string Contenedor
    {
        get { return "ACT_ATRIBUTO_DET"; }
    }

    protected void nav_Siguiente(object sender, EventArgs e)
    {
        Gv_SelectedIndexChanged(sender, e);
    }

    protected override void DefinirParametrosFijosDeInsercion(System.Collections.Generic.List<DictionaryEntry> param)
    {
        if (Request.QueryString.Count > 0)
        {
            param.Add(new DictionaryEntry("Act_Atributo_Id", Request.QueryString["Act_Atributo_Id"]));
            param.Add(new DictionaryEntry("Act_Atributo_Codigo", ObtenerAct_Atributo_Actual.Codigo));
            param.Add(new DictionaryEntry("Act_Atributo_Nombre", ObtenerAct_Atributo_Actual.Nombre));

        }
        base.DefinirParametrosFijosDeInsercion(param);
    }
    protected void BtnAtributo_Click(object sender, EventArgs e)
    {
        TextBox AtributoId = (TextBox)Fv.FindControl("Act_Atributo_Id");
        Response.Redirect("~/ACT/ACT_ATRIBUTO.aspx?Act_Atributo_Id=" + AtributoId.Text);
    }


}
